﻿@model KnowledgeCommunity.Model.Trouble

@{
    ViewBag.Title = "Replay";
}

<div class="path one columns">Replay</div>

<div class="slider"></div>

<div class="commentform">
    @using (Html.BeginForm("DoSearch", "Trouble", FormMethod.Post, new { enctype = "multipart/form-data" }))
    {
        @Html.ValidationSummary(true)
        <input id="_key" name="_key" type="text" />
        <input class="button" id="Search_click" name="Search_click" type="submit" value="Search" />
        <br />
    }
</div>

<div class="slider"></div>
<div class="columns three-fourths">
    <div id="comments">
    <h2>4 Comments</h2>
    <div class="comment">
    <div class="line"></div>
    <div class="image"><img src="@Url.Content("~/Content/images/user_2.png")" alt="user" /></div>
    <div class="commentcontent">
    <div class="date"> <a href="@Url.Action("Replay", "Trouble", new { id = Model.Id })">Replay</a> @Model.AddTime.ToShortTimeString() by @t_item.UserName </div>
    <p>@Model.Content</p>
    </div>
</div>
@foreach (var a_item in (IEnumerable<KnowledgeCommunity.Model.Answer>)ViewData["AnswerList"])
{
    if (Model.ShapeCode == a_item.ShapeCode)
    {
        <div class="replay">
            <div class="line"></div>
            <div class="image"><img src="@Url.Content("~/Content/images/user_1.png")" alt="user" /></div>
            <div class="commentcontent">
            <div class="date"> 
                <a href="#">
                    <label style=" font-size:medium; color:Olive; font-weight:bold;">@Enum.GetName(typeof(KnowledgeCommunity.Service.Enum.AnswerClass), a_item.State)</label>
                </a> 
                @a_item.AddTime.ToShortTimeString() by @a_item.UserName 
            </div>
            <p>@a_item.Content</p>
            </div>
        </div>
    }
}
    <div class="clear"></div>

    <div class="commentform">
        @using (Html.BeginForm("Replay", "Trouble", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
            @Html.ValidationSummary(true)
            @Html.HiddenFor(model => model.Id)
            @Html.HiddenFor(model => model.ShapeCode)
            <p>Write My Answer</p>
                <textarea id="_message" name="message" cols="10" rows="10"></textarea>
            <br/>
            <input class="button" name="Send" type="submit" value="Do Answer" />
        }
    </div>
    </div>

</div>









<h2>Replay</h2>

<fieldset>
    <legend>Trouble</legend>

    <div class="display-label">ShapeCode</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.ShapeCode)
    </div>

    <div class="display-label">Title</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Title)
    </div>

    <div class="display-label">Content</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Content)
    </div>

    <div class="display-label">Value</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Value)
    </div>

    <div class="display-label">UserName</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.UserName)
    </div>

    <div class="display-label">State</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.State)
    </div>

    <div class="display-label">CollegeCode</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.CollegeCode)
    </div>

    <div class="display-label">AddTime</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.AddTime)
    </div>
</fieldset>

